package com.platform.common.core.domain.entity;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.platform.common.core.annotation.Excel;
import com.platform.common.core.web.domain.BaseEntity;

/**
 * 接口服务对象 plat_api
 *
 * @author platform
 * @date 2023-04-07
 */
public class PlatApi extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** api主键 */
    private Long apiId;

    /** api访问地址 */
    @Excel(name = "api访问地址")
    private String apiUrl;

    /** 接口名称 */
    @Excel(name = "接口名称")
    private String apiName;

    /** 所属服务 */
    @Excel(name = "所属服务")
    private String serviceName;

    /** 接口类型（0鉴权、1用户、2部门、3角色、4标签、5菜单、6岗位、7日志、8消息） */
    @Excel(name = "接口类型", readConverterExp = "0=鉴权、1用户、2部门、3角色、4标签、5菜单、6岗位、7日志、8消息")
    private String apiType;

    /** api 状态 1 已发布 0 已停用 2 不可用 */
    @Excel(name = "api 状态 1 已发布 0 已停用 2 不可用")
    private String apiStatus;

    /** 加密工具 */
    @Excel(name = "加密工具")
    private Long secretId;

    /** 接口私钥 */
    @Excel(name = "接口私钥")
    private String apiPrivateSecret;

    /** 接口公钥 */
    @Excel(name = "接口公钥")
    private String apiPublicSecret;

    /** 审核状态0-待审核1-审核通过2-审核不通过 */
    @Excel(name = "审核状态0-待审核1-审核通过2-审核不通过")
    private String approveStatus;

    /** 审核人 */
    @Excel(name = "审核人")
    private String approveBy;

    /** 审核时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "审核时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date approveTime;

    /** 审核备注（不通过原因） */
    @Excel(name = "审核备注", readConverterExp = "不=通过原因")
    private String approveRemake;

    /** 是否公用1-是0-否 */
    @Excel(name = "是否公用1-是0-否")
    private String isPublic;

    public void setApiId(Long apiId)
    {
        this.apiId = apiId;
    }

    public Long getApiId()
    {
        return apiId;
    }
    public void setApiUrl(String apiUrl)
    {
        this.apiUrl = apiUrl;
    }

    public String getApiUrl()
    {
        return apiUrl;
    }
    public void setApiName(String apiName)
    {
        this.apiName = apiName;
    }

    public String getApiName()
    {
        return apiName;
    }
    public void setServiceName(String serviceName)
    {
        this.serviceName = serviceName;
    }

    public String getServiceName()
    {
        return serviceName;
    }
    public void setApiType(String apiType)
    {
        this.apiType = apiType;
    }

    public String getApiType()
    {
        return apiType;
    }
    public void setApiStatus(String apiStatus)
    {
        this.apiStatus = apiStatus;
    }

    public String getApiStatus()
    {
        return apiStatus;
    }
    public void setSecretId(Long secretId)
    {
        this.secretId = secretId;
    }

    public Long getSecretId()
    {
        return secretId;
    }
    public void setApiPrivateSecret(String apiPrivateSecret)
    {
        this.apiPrivateSecret = apiPrivateSecret;
    }

    public String getApiPrivateSecret()
    {
        return apiPrivateSecret;
    }
    public void setApiPublicSecret(String apiPublicSecret)
    {
        this.apiPublicSecret = apiPublicSecret;
    }

    public String getApiPublicSecret()
    {
        return apiPublicSecret;
    }
    public void setApproveStatus(String approveStatus)
    {
        this.approveStatus = approveStatus;
    }

    public String getApproveStatus()
    {
        return approveStatus;
    }
    public void setApproveBy(String approveBy)
    {
        this.approveBy = approveBy;
    }

    public String getApproveBy()
    {
        return approveBy;
    }
    public void setApproveTime(Date approveTime)
    {
        this.approveTime = approveTime;
    }

    public Date getApproveTime()
    {
        return approveTime;
    }
    public void setApproveRemake(String approveRemake)
    {
        this.approveRemake = approveRemake;
    }

    public String getApproveRemake()
    {
        return approveRemake;
    }
    public void setIsPublic(String isPublic)
    {
        this.isPublic = isPublic;
    }

    public String getIsPublic()
    {
        return isPublic;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
                .append("apiId", getApiId())
                .append("apiUrl", getApiUrl())
                .append("apiName", getApiName())
                .append("serviceName", getServiceName())
                .append("apiType", getApiType())
                .append("apiStatus", getApiStatus())
                .append("secretId", getSecretId())
                .append("apiPrivateSecret", getApiPrivateSecret())
                .append("apiPublicSecret", getApiPublicSecret())
                .append("approveStatus", getApproveStatus())
                .append("approveBy", getApproveBy())
                .append("approveTime", getApproveTime())
                .append("approveRemake", getApproveRemake())
                .append("isPublic", getIsPublic())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .append("remark", getRemark())
                .toString();
    }
}
